#include <iostream>
#include <vector>

using namespace std;

int BinarySearch(vector<int> &vec, int n, int key)
{
    int left = 0, right = n-1;
    while(left <= right)
    {
        int mid = left + ((right - left) / 2);
        if(key < vec[mid])
            right = mid - 1;
        else if(key > vec[mid])
            left = mid + 1;
        else 
            return mid;
    }
    return -1;
}
int main()
{
    int n;
    cin >> n;

    vector<int> vec;
    for(int i = 0; i < n; ++i)
    {
        int temp;
        cin >> temp;
        vec.push_back(temp);
    }
    
    int key;
    cin >> key;

    int index = BinarySearch(vec, n, key);
    if(index == -1)
    {    
        cout << "无该元素" << endl;
    }
    else 
    {
        cout << index << endl;
    }
    return 0;
}
